package com.secf.service.action.hpy.mc.scjcjd.test;

import java.util.Arrays;

public class ArrayCopyTest {
    public static void main(String[] args) {
        String[] original = {"Apple", "Banana", "Orange"};
        String[] copied = new String[original.length];
        System.arraycopy(original, 0, copied, 0, original.length);

        // 修改原数组，验证拷贝数组是否受到影响
        original[0] = "Grapes";

        System.out.println("Original array: " + Arrays.toString(original));
        System.out.println("Copied array: " + Arrays.toString(copied));
    }
}